const Koa = require('koa');
const bodyParse = require('koa-bodyparser');

const router = require('./routers');

const app = new Koa();

app.use(bodyParse());

router(app);

app.listen(3000, err => {
  if (err) {
    console.log(err);
  } else {
    console.log('Server is running at http://localhost:3000.');
  }
});
